﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace ActivePalInterop.Data
{
    /// <summary>
    /// Contains static info about ActivePal .csv file
    /// </summary>
    public sealed class DecompressedPalData : IUploadableData
    {
        /// <summary>
        /// Database table name
        /// </summary>
        public string TableName { get { return "tblDecompressedData"; } }

        /// <summary>
        /// Ammount of data to be write as bulk insert
        /// </summary>
        public int CommitBatchSize { get { return 1000; } }

        /// <summary>
        /// Ammount of rows to be skipped while reading the csv file
        /// </summary>
        public int SkippedHeaderCount { get; set; }

        /// <summary>
        /// Mapped columns of the database table
        /// </summary>
        public DataColumnCollection Columns
        {
            get
            {
                DataColumn c1 = new DataColumn("session_id", typeof(Guid));
                DataColumn c2 = new DataColumn("date", typeof(DateTime));
                DataColumn c3 = new DataColumn("value", typeof(byte));
                DataTable t = new DataTable();
                t.Columns.Add(c1);
                t.Columns.Add(c2);
                t.Columns.Add(c3);
                return t.Columns;
            }
        }

    }
}
